<style type="text/css">
.page_tit {font-size: 14px;font-weight: bold;color: #1e325c;line-height: 40px;}
.page_tab {height: 35px;border-bottom: 2px solid #9cb8cc;padding-left: 100px;}
.page_tab span.active {padding-bottom: 4px;background: #FFFFFF;border-bottom: none;color: #000000;cursor: default;}
.page_tab span {float: left;color: #FFFFFF;padding: 0px 20px;position: relative;z-index: 100px;background: #9CB8CC;border: 2px solid #9CB8CC;margin-left: 2px;height: 31px;line-height: 35px;cursor: pointer;}
.x_member_form .form2 {height: auto;overflow: auto;}
.x_member_form .form2 .lineD {margin: 0;overflow: hidden;line-height: 40px;    border-bottom: 1px dashed #e2e2e2;}
.x_member_form .form2 .lineD dt {width: 150px;color: #9CB8CC;font-weight: bold;    margin: 0;float: left;text-align: right;}
.x_member_form .form2 .lineD dd {width: 200px;float: left;margin-left: 0px;margin: 0;padding: 0;}
.x_member_form .form2 .lineD dd img{width:100px;height:100px;margin:10px 0px;}
#tab_3 table,#tab_4 table{width: 100%;}
#tab_3 table * tr,#tab_4 table * tr{height:40px;line-height:40px;}
#tab_3 table * tr td,#tab_4 table * tr td{width:50%;color: #9CB8CC;}
#tab_4 table * tr td{width:20%;color: #9CB8CC; font-size: 14px; line-height: 18px; border-bottom: 1px dashed #e2e2e2;}

.pagination {
	font-family: arial
}
.pagination a{
	list-style: none;
	text-decoration:none;
}
.pagination a, .pagination span {
	padding: 2px 7px;
	background: #fff;
	color: #666;
	border: 1px solid #d2d2d2;
	text-align: center;
	margin-left: 5px;
	font-size: 13px
}

.pagination a:hover {
	color: #da4848;
	text-decoration: none;
	background: #fff
}

.pagination .current {
	color: #fff;
	text-decoration: none;
	border: 1px solid #cf2323;
	background: #da4848
}

.pagination .current.prev, .pagination .current.next {
	font-family: simsun;
	background: #fff;
	color: #666;
	border: 1px solid #d2d2d2
}

.pageState {
	font-size: 13px;
	margin-left: 10px;
	font-weight: 400
}

</style>

<div class="so_main x_member_form">
	<div class="page_tit">{$useinfo.nick_name|default=''}&nbsp;&nbsp;&nbsp;&nbsp;详细信息</div>
	<div class="page_tab">
		<span data="tab_1" class="active">会员资料</span> 
		<span data="tab_2">订单记录</span>
		<span data="tab_3">组团记录</span>
		<span data="tab_4">登录记录</span>
	</div>
	<div class="form2">

		<div id="tab_1" class='showceng'>
			<dl class="lineD">
				<dt>用户头像：</dt>
				<dd><img src="{$useinfo.head_img|default=''}"/></dd>
				<dt>用户编号：</dt>
				<dd>{$useinfo.user_id|default=''}</dd><br/>
				<dt>用户昵称：</dt>
				<dd>{$useinfo.nick_name|default='未设置'}</dd><br/>
				<dt>用户手机：</dt>
				<dd>{$useinfo.mobile|default='未设置'}</dd>
			</dl>
			

			<dl class="lineD">
				<dt>用户性别：</dt>
				<dd>{if condition="$useinfo.sex eq '1' || $useinfo.sex eq '男'"}男
					{elseif condition="$useinfo.sex eq '2' || $useinfo.sex eq '女'"}女
					{else/}未选择{/if}
				</dd>
				<dt>用户状态：</dt>
				<dd>{if condition="isset($useinfo.status) && $useinfo.status eq '1'"}正常{else/}冻结{/if}</dd>
			</dl>
			<dl class="lineD">
				<dt>微信地址：</dt>
				<dd>{$useinfo.addres|default='未设置'}</dd>
				<dt>来访次数：</dt>
				<dd>{$useinfo.hits|default='0'}</dd>
			</dl>
			<dl class="lineD">
				<dt>用户坐标：</dt>
				<dd style="width:550px;">经度:{$useinfo.point_lng|default="未获取"} &nbsp;&nbsp;,&nbsp;&nbsp;纬度:{$useinfo.point_lat|default="未获取"}</dd>
			</dl>
			<dl class="lineD">
				<dt>微信ID：</dt>
				<dd style="width:550px;">{$useinfo.wx_openid|default=""}</dd>
			</dl> 
			<dl class="lineD">
				<dt>注册来源：</dt>
				<dd style="width:550px;">{$useinfo.source|default=""}</dd>
			</dl>
			
			<dl class="lineD">
				<dt>会员类型：</dt>
				<dd style="width:550px;">
					<label><input name="usertype" type="radio" value="0" {if condition="$useinfo.user_type eq '0'"}checked{/if}/>来访游客</label> 
					<label><input name="usertype" type="radio" value="1" {if condition="$useinfo.user_type eq '1'"}checked{/if}/>高级会员</label> 
				</dd>
			</dl>
			<dl class="lineD">
				<dt>会员备注：</dt>
				<dd><form>
					<textarea id="remark" rows="" cols="" style='width:550px;height:100px;margin:10px 0;'>{$useinfo.remark|default=""}</textarea>
					</form>
				</dd>
			</dl>
		</div>
		<!--tab1-->
		<div id="tab_2" class='showceng' style='display:none;'>
			
			
			
			
			
		</div>
		<!--tab2-->
		<!--tab3-->
		<div id="tab_3" class='showceng' style='display:none;'>
			


		</div>
		<div id="tab_4" class='showceng' style='display:none;'>
			<table>
				<thead>
					<tr>
						<td style="text-align:center;">登陆IP</td>
						<td style="text-align:left;">登陆时间</td>
					</tr>
				</thead>
				<tbody id="ipcontent">

				</tbody>

			</table>
			<div class="pager-content table-style-footer-1" style="text-align: center">
				<div class="pagination">共<span id="totalnum">0</span> 条 &nbsp;&nbsp;
					当前第&nbsp;<span id="currentpage">0</span>&nbsp;/&nbsp;<span id="totalpage">0</span>&nbsp;页&nbsp;&nbsp;
					<a href="javascript:void(0);" page="1"  class="prevnext delcolor pagetz" onclick="topage(this)">首页</a>
					<a href="javascript:void(0);" page="1" id="prepage"class="prevnext delcolor pagetz" onclick="topage(this)">上一页</a>
					<a href="javascript:void(0);" page="2" id="nextpage"class="prevnext delcolor pagetz" onclick="topage(this)">下一页</a>
					转到&nbsp;<input type="text" value="1" class="tzpages" id="comefirepage" style="width:48px; display: inline-block;color: #949494; margin:0; padding:0; border:#ccc solid 1px; height:21px; line-height:22px;" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">&nbsp;页&nbsp;&nbsp;
					<a href="javascript:void(0);" class="prevnext delcolor pagetz issubmit" onclick="topagecomfire(this)">确定</a>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="/static/admin/js/core/jquery.min.js"></script>
<script src="/static/libs/layer/layer.js"></script>




<script>
//回调函数
var callbackdata = function () {
	 var data = {
		remark: $("#remark").val(),
		user_type: $('input[name="usertype"]:checked').val(),
	 };
	 return data;
 }
$(function(){
	//切换事件
	$(".page_tab span").click(function(){
		var tempdata=$(this).attr('data');
		$idobj="#"+tempdata;
		if(tempdata=='tab_4'){
			getdata(1);
		}
		$(".showceng").hide();
		$($idobj).show();
		$(".page_tab span").removeClass('active');
		$(this).addClass('active');
	})

})
function topage(elment){
	var topage=$(elment).attr("page");
	getdata(topage);
}
function topagecomfire(){
	var topage=$("#comefirepage").val();
	getdata(topage);
}
function getdata(p){
	//ajax获取
	var tempuid='{$useinfo.user_id}';
	$.ajax({
		url:"{:url('getuserloginip')}",
		data:{"id":tempuid,"limit":10,"page":p},
		dataType:"json",
		method:"post",
		success:function(res){
			if(res.code==1){
				$("#ipcontent").html('');
				$.each(res.data.data,function(index,elment){
					var temphtml='<tr><td style="text-align:center;">'+elment['ip']+'</td> <td style="text-align:left;">'+elment['add_time_show']+'</td> </tr>'
					$("#ipcontent").append(temphtml);
				});
				var curp=parseInt(res.data.page);
				var allpage=parseInt(res.data.pages);
				$("#totalnum").html(res.data.rows);
				$("#currentpage").html(curp);
				$("#totalpage").html(res.data.pages);
				$("#prepage").attr("page",curp-1);
				$("#nextpage").attr("page",curp+1);
				if(curp==1){
					$("#prepage").attr("disabled",true);
				}
				if(curp==allpage){
					$("#nextpage").attr("disabled",true);
				}
			}else{

			}
		}
	})
}
</script>
